home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir24 / psi110g.zip / INTERNET.H < prev    next >
C/C++ Source or Header  |  1994-08-26  |  2KB  |  69 lines

  1. /* Mods by PA0GRI */
  2. #ifndef _INTERNET_H
  3. #define _INTERNET_H
  4.   
  5. #ifndef _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.   
  9. /* Global structures and constants pertaining to the interface between IP and
  10.  *  higher level protocols
  11.  */
  12.   
  13. /* IP protocol field values */
  14. #define ICMP_PTCL   1   /* Internet Control Message Protocol */
  15. #define    IP4_PTCL    4   /* IP inside IP */
  16. #define TCP_PTCL    6   /* Transmission Control Protocol */
  17. #define UDP_PTCL    17  /* User Datagram Protocol */
  18. #define RSPF_PTCL   73  /* Radio Shortest Path First Protocol */
  19. #define AX25_PTCL   93  /* AX25 inside IP according to RFC-1226 */
  20. #define IP_PTCL     94  /* JI's IP inside IP */
  21.   
  22. #define MAXTTL      255 /* Maximum possible IP time-to-live value */
  23.   
  24. /* DoD-style precedences */
  25. #define ROUTINE     0x00
  26. #define PRIORITY    0x20
  27. #define IMMEDIATE   0x40
  28. #define FLASH       0x60
  29. #define FLASH_OVER  0x80
  30. #define CRITIC      0xa0
  31. #define INET_CTL    0xc0
  32. #define NET_CTL     0xe0
  33.   
  34. /* Amateur-style precedences */
  35. #define AM_ROUTINE  0x00
  36. #define AM_WELFARE  0x20
  37. #define AM_PRIORITY 0x40
  38. #define AM_EMERGENCY    0x60
  39.   
  40. /* Class-of-service bits */
  41. #define LOW_DELAY   0x10
  42. #define THROUGHPUT  0x08
  43. #define RELIABILITY 0x04
  44.   
  45. /* IP TOS fields */
  46. #define PREC(x)     (((x)>>5) & 0x7)
  47. #define DELAY       0x10
  48. #define THRUPUT     0x8
  49. #define RELIABLITY  0x4
  50.   
  51. /* Pseudo-header for TCP and UDP checksumming */
  52. struct pseudo_header {
  53.     int32 source;       /* IP source */
  54.     int32 dest;     /* IP destination */
  55.     char protocol;      /* Protocol */
  56.     int16 length;       /* Data field length */
  57. };
  58. #define NULLHEADER  (struct pseudo_header *)0
  59.   
  60. /* Format of a MIB entry for statistics gathering */
  61. struct mib_entry {
  62.     char *name;
  63.     struct {
  64.         int32 integer;
  65.     } value;
  66. };
  67.   
  68. #endif  /* _INTERNET_H */
  69.